<template>
  <div></div>
</template>

<script setup>
import { onBeforeMount } from 'vue'
import { useRoute, useRouter } from 'vue-router'

const route = useRoute()
const router = useRouter()

onBeforeMount(() => {
  const { params, query } = route
  const { path } = params
  const targetPath = path.startsWith('/') ? path : '/' + path
  router.replace({ path: targetPath, query })
})
</script> 